package com.lanou.userLogin.order.dao;

import com.lanou.userLogin.order.domain.Order;
import com.lanou.userLogin.order.domain.OrderBook;
import com.lanou.userLogin.order.domain.OrderItem;

import java.util.Date;
import java.util.List;

public interface OrderDao {

    //添加订单
    void insertOrder(String oid, String orderTime, double total, String state, String uid, String address);

    //添加订单项
    void insertOrderItem(String iid, int count, String subtotal, String oid, String bid);

    //oid查询订单
    Order selectOrderByoid(String oid);

    //oid查询OrderBook的list
    List<OrderBook> selectOrderBook(String oid);

    //订单支付
    void orderPay(String oid ,String address);

    //根据uid从数据库获取订单信息的list
    List<Order> selectOrder(String uid);

    // 通过oid获取每个订单下的订单项集合
    List<OrderItem> selectOrderItem(String oid);

    //确认收货
    //修改订单状态 3->4
    void confirmReceipt(String oid,int state);
}
